package com.li.hsanguosha.msg;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SerializerFeature;
import lombok.Data;

/**
 * @Author 乔占江 qq:59663479
 * @Data 2021/12/19 10:03
 * @Description 全部协议的父类
 * @Version 1.0
 */
@Data
public class NetMessage {
    public int code;


    public String username;
    public String password;
    public String nickname;

    // 两个简单的 通用参数
    public Integer num;
    public String str;

    // 复杂参数
    public String param;

    public String toJson() {
        return JSON.toJSONString(this, SerializerFeature.IgnoreErrorGetter);
    }


}
